const args = process.argv;
const jsonFileName = args[2] + ".json"; 
const startPos = Number(args[3]);
const len = Number(args[4]);


const jsonContent = require("./" + jsonFileName);

let lineStr = '';
    jsonContent.textStream.forEach(item1 => lineStr += item1.textRange.map((item) => item.text).join(''));
console.log(lineStr.length);
const start = startPos;
const end = len < startPos ? startPos + len - 1: len;
// debugger;
console.log(JSON.stringify(lineStr.slice(start, end + 1)));